<template>
  <div>
    <el-tooltip
        class="box-item"
        effect="dark"
        content="在新Tab打开接口文档"
        placement="left-start"
    >
      <el-button type="primary" :icon="TopRight" circle
                 @click="openDoc" style="position: absolute; right: 10px; top: 10px;"/>
    </el-tooltip>
    <i-frame v-model:src="url"></i-frame>
  </div>
</template>

<script setup>
import {TopRight} from '@element-plus/icons-vue'
import iFrame from '@/components/iFrame'

const url = ref(import.meta.env.VITE_APP_BASE_API + "/doc.html")

function openDoc() {
  window.open('http://localhost:8080/doc.html')
}
</script>
